package middleware

import (
	"github.com/gin-gonic/gin"
	"github.com/lestrrat-go/file-rotatelogs"
	"io"
	"log"
)

func InitLog() {
	r, _ := rotatelogs.New("log/gin_%Y%m%d.log")
	gin.DefaultWriter = io.MultiWriter(r)
	log.SetOutput(r)
}
